package com.greenx.core.common.utils;

import java.util.HashMap;
import java.util.Map;

public enum Contants {

	INVALID_REQUEST_EXCEPTION("INVALID_REQUEST_EXCEPTION"), INVALID_RESPONSE_EXCEPTION(
			"INVALID_RESPONSE_EXCEPTION"), DATASERVICE_EXCEPTION(
			"DATASERVICE_EXCEPTION");

	private static Map<String, Contants> contantsMap = new HashMap<String, Contants>();

	private Contants(final String message) {
		this.message = message;
	}

	static {
		for (Contants contants : Contants.values())
			contantsMap.put(contants.message, contants);
	}

	private String message;

	public String getMessage() {
		return message;
	}

	public static Contants getContants(String key) {
		return contantsMap.get(key);
	}

}
